package com.example.demo.util;

import lombok.extern.slf4j.Slf4j;

import javax.servlet.http.HttpServletRequest;
import java.util.Enumeration;

/**
 * Created by void on 2020/4/12.
 */
@Slf4j
public class HttpUtil {

    public static void printAllHeader(HttpServletRequest request){
        Enumeration<String> stringEnumeration = request.getHeaderNames();
        while (stringEnumeration.hasMoreElements()){
            String string = stringEnumeration.nextElement();
            log.info("{} : {}",string, request.getHeader(string));
        }
    }
}
